<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var num=parseInt(prompt("输入打印行数",""));
for(var i=0;i<num;i++){
	for(var x=0;x<num-i;x++){
		document.write("&nbsp;");
	}
	for(var j=0;j<=i;j++){
		document.write("*"+"&nbsp;");
	}
	document.write("<br>");
}
</script>
</body>
</html>
